﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;
using System.ComponentModel;
using System.Data;

using ShootSearch.Util;
using ShootSearch.Util.Serializers;

using Quartz;

namespace ShootSearch.Core
{
    public interface ISpiderMan : IConfigable, IInterruptableJob, IDisposable
    {
        JobStatus Status { get; }
        DataTable DetailStatus { get; }
    }


    public enum JobStatus
    {
        Unstarted,
        Running,
        Stopping,
        Stopped,
        Completing,
        Completed
    }

    [Serializable]
    [TypeConverter(typeof(ExpandableConverter<SpiderManConfig>))]
    public abstract class SpiderManConfig
    {
        public void Save(string path)
        {
            XmlFormatter.ToXmlFile(this, path);
        }

    }
}
